package com.malty.mall.controller;

import com.malty.mall.common.CommonResult;
import com.malty.mall.manager.RedisManager;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Set;

/**
 * @author malty
 */
@RestController
@RequestMapping("/test")
public class TestController {
    @Autowired
    RedisManager redisManager;

    @RequestMapping("/redis/keys")
    public CommonResult<Set<String>> redisKeys() {
        return CommonResult.success(redisManager.keys());
    }
}
